package com.doit.doc;

import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class ApisDemo7 {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\test\\a.txt");
        FileWriter fw = new FileWriter(file);

        fw.write("学大数据，就来多易教育");

        char[] chars = "学大数据，就来多易教育".toCharArray();
        fw.write(chars);


        fw.write(97);
        fw.write('学');
        fw.write('大');
        fw.write('数');
        fw.write('据');
        fw.write('，');
        fw.write('来');
        fw.write('多');
        fw.write('易');

        fw.close();

    }
}
